	<?php 
		if(isset($gallery) && !empty($gallery) || isset($download_files) && !empty($download_files)){
			if(count($gallery) == 1 ) $width = 240;
			if(count($gallery) == 2 ) $width = 120;
			if(count($gallery) >= 3 ) $width = 77;
	?>
    <div class="<?php echo $article_slug ?>">
        <div class="gallery-highslide album">
             <ul>
             	<?php 
             	foreach ($gallery as $key => $image){
             		if(is_numeric($key)){
	           	?>
            	<li>
        		    <?php  echo $this->Html->link($this->Html->image(Configure::read('Config.loacl_uploads_folder').$image['Upload']['name'],array('width'=>$width,'height'=>$width,'alt'=>$image['Upload']['description'],'title'=>$image['Upload']['description'])),Configure::read('Config.loacl_uploads_folder').$image['Upload']['name'],array('escape'=>false,'title'=>$image['Upload']['description'],'class'=>"highslide", 'onclick'=>"return hs.expand(this,{slideshowGroup:'gallery-highslide-$article_slug'})"));?>
                </li>
            	<?php }}?>
            	
            	<?php 

             	foreach ($download_files as $key => $file){
             		if(is_numeric($key)){
	           	?>
            	<li>
	            	
	            	<div class="tn3 description"><?php echo __d('articles','added:',true).' '.$file['Upload']['created']?></div>
        		    <?php
        		    	$patch = Configure::read('Config.loacl_uploads_folder'); 
        		    	echo $this->Html->link($this->Html->image(Configure::read('Config.loacl_uploads_folder').'download_file.png',array('alt'=>$file['Upload']['description'],'title'=>$file['Upload']['description'])),Configure::read('Config.loacl_uploads_folder').'download_bg.png',array('escape'=>false,'title'=>$file['Upload']['description'],'onclick'=>"document.location='{$patch}{$file['Upload']['name']}'"));?>
        		    <h4><?php echo $this->Html->link($this->Html->image(Configure::read('Config.loacl_uploads_folder').'download_file.png',array('style'=>'vertical-align: middle;')).$file['Upload']['description'],Configure::read('Config.loacl_uploads_folder').$file['Upload']['name'],array('escape'=>false))?></h4>
                </li>
            	<?php }}?>
            </ol>
        </div>
    </div> 
    <?php }?>